3.1.21 \(\int x (d+e x)^3 (a+b \log (c x^n)) \, dx\) [21]

3.1.21.1 Optimal result
3.1.21.2 Mathematica [A] (verified)
3.1.21.3 Rubi [A] (verified)
3.1.21.4 Maple [A] (verified)
3.1.21.5 Fricas [A] (verification not implemented)
3.1.21.6 Sympy [A] (verification not implemented)
3.1.21.7 Maxima [A] (verification not implemented)
3.1.21.8 Giac [A] (verification not implemented)
3.1.21.9 Mupad [B] (verification not implemented)

3.1.21.1 Optimal result

Integrand size = 19, antiderivative size = 122 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {b d^4 n x}{5 e}+\frac {3}{20} b d^3 n x^2+\frac {1}{15} b d^2 e n x^3+\frac {1}{80} b d e^2 n x^4-\frac {b n (d+e x)^5}{25 e^2}+\frac {b d^5 n \log (x)}{20 e^2}-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right ) \]

output
1/5*b*d^4*n*x/e+3/20*b*d^3*n*x^2+1/15*b*d^2*e*n*x^3+1/80*b*d*e^2*n*x^4-1/2 
5*b*n*(e*x+d)^5/e^2+1/20*b*d^5*n*ln(x)/e^2-1/20*(5*d*(e*x+d)^4/e^2-4*(e*x+ 
d)^5/e^2)*(a+b*ln(c*x^n))
 
3.1.21.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.07 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{4} b d^3 n x^2-\frac {1}{3} b d^2 e n x^3-\frac {3}{16} b d e^2 n x^4-\frac {1}{25} b e^3 n x^5+\frac {1}{2} d^3 x^2 \left (a+b \log \left (c x^n\right )\right )+d^2 e x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {3}{4} d e^2 x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{5} e^3 x^5 \left (a+b \log \left (c x^n\right )\right ) \]

input
Integrate[x*(d + e*x)^3*(a + b*Log[c*x^n]),x]
 
output
-1/4*(b*d^3*n*x^2) - (b*d^2*e*n*x^3)/3 - (3*b*d*e^2*n*x^4)/16 - (b*e^3*n*x 
^5)/25 + (d^3*x^2*(a + b*Log[c*x^n]))/2 + d^2*e*x^3*(a + b*Log[c*x^n]) + ( 
3*d*e^2*x^4*(a + b*Log[c*x^n]))/4 + (e^3*x^5*(a + b*Log[c*x^n]))/5
 
3.1.21.3 Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {2771, 27, 90, 49, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx\)

\(\Big \downarrow \) 2771

\(\displaystyle -b n \int -\frac {(d-4 e x) (d+e x)^4}{20 e^2 x}dx-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b n \int \frac {(d-4 e x) (d+e x)^4}{x}dx}{20 e^2}-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right )\)

\(\Big \downarrow \) 90

\(\displaystyle \frac {b n \left (d \int \frac {(d+e x)^4}{x}dx-\frac {4}{5} (d+e x)^5\right )}{20 e^2}-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right )\)

\(\Big \downarrow \) 49

\(\displaystyle \frac {b n \left (d \int \left (\frac {d^4}{x}+4 e d^3+6 e^2 x d^2+4 e^3 x^2 d+e^4 x^3\right )dx-\frac {4}{5} (d+e x)^5\right )}{20 e^2}-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b n \left (d \left (d^4 \log (x)+4 d^3 e x+3 d^2 e^2 x^2+\frac {4}{3} d e^3 x^3+\frac {e^4 x^4}{4}\right )-\frac {4}{5} (d+e x)^5\right )}{20 e^2}-\frac {1}{20} \left (\frac {5 d (d+e x)^4}{e^2}-\frac {4 (d+e x)^5}{e^2}\right ) \left (a+b \log \left (c x^n\right )\right )\)

input
Int[x*(d + e*x)^3*(a + b*Log[c*x^n]),x]
 
output
(b*n*((-4*(d + e*x)^5)/5 + d*(4*d^3*e*x + 3*d^2*e^2*x^2 + (4*d*e^3*x^3)/3 
+ (e^4*x^4)/4 + d^4*Log[x])))/(20*e^2) - (((5*d*(d + e*x)^4)/e^2 - (4*(d + 
 e*x)^5)/e^2)*(a + b*Log[c*x^n]))/20
 

3.1.21.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 49
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2771
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ 
.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a 
 + b*Log[c*x^n]), x] - Simp[b*n   Int[SimplifyIntegrand[u/x, x], x], x]] /; 
 FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IGtQ[m, 0]
 
3.1.21.4 Maple [A] (verified)

Time = 0.67 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.16

method result size
parallelrisch \(\frac {x^{5} b \ln \left (c \,x^{n}\right ) e^{3}}{5}-\frac {b \,e^{3} n \,x^{5}}{25}+\frac {x^{5} a \,e^{3}}{5}+\frac {3 x^{4} b \ln \left (c \,x^{n}\right ) d \,e^{2}}{4}-\frac {3 b d \,e^{2} n \,x^{4}}{16}+\frac {3 x^{4} a d \,e^{2}}{4}+x^{3} b \ln \left (c \,x^{n}\right ) d^{2} e -\frac {b \,d^{2} e n \,x^{3}}{3}+x^{3} a \,d^{2} e +\frac {x^{2} b \ln \left (c \,x^{n}\right ) d^{3}}{2}-\frac {b \,d^{3} n \,x^{2}}{4}+\frac {a \,d^{3} x^{2}}{2}\) \(142\)
risch \(\frac {x^{5} a \,e^{3}}{5}+\ln \left (c \right ) b \,d^{2} e \,x^{3}+\frac {3 \ln \left (c \right ) b d \,e^{2} x^{4}}{4}-\frac {3 i \pi b d \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{8}-\frac {i \pi b \,d^{2} e \,x^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}-\frac {i \pi b \,d^{3} x^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i \pi b \,e^{3} x^{5} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{10}+x^{3} a \,d^{2} e +\frac {3 x^{4} a d \,e^{2}}{4}+\frac {\ln \left (c \right ) b \,d^{3} x^{2}}{2}+\frac {\ln \left (c \right ) b \,e^{3} x^{5}}{5}+\frac {i \pi b \,d^{3} x^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b \,e^{3} x^{5} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{10}+\frac {i \pi b \,e^{3} x^{5} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{10}-\frac {3 i \pi b d \,e^{2} x^{4} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{8}-\frac {i \pi b \,d^{2} e \,x^{3} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i \pi b \,d^{3} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {a \,d^{3} x^{2}}{2}+\frac {b \,x^{2} \left (4 e^{3} x^{3}+15 d \,e^{2} x^{2}+20 d^{2} e x +10 d^{3}\right ) \ln \left (x^{n}\right )}{20}+\frac {i \pi b \,d^{2} e \,x^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {3 i \pi b d \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{8}+\frac {3 i \pi b d \,e^{2} x^{4} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{8}-\frac {i \pi b \,e^{3} x^{5} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{10}+\frac {i \pi b \,d^{2} e \,x^{3} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \pi b \,d^{3} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{4}-\frac {b \,d^{2} e n \,x^{3}}{3}-\frac {3 b d \,e^{2} n \,x^{4}}{16}-\frac {b \,d^{3} n \,x^{2}}{4}-\frac {b \,e^{3} n \,x^{5}}{25}\) \(598\)

input
int(x*(e*x+d)^3*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)
 
output
1/5*x^5*b*ln(c*x^n)*e^3-1/25*b*e^3*n*x^5+1/5*x^5*a*e^3+3/4*x^4*b*ln(c*x^n) 
*d*e^2-3/16*b*d*e^2*n*x^4+3/4*x^4*a*d*e^2+x^3*b*ln(c*x^n)*d^2*e-1/3*b*d^2* 
e*n*x^3+x^3*a*d^2*e+1/2*x^2*b*ln(c*x^n)*d^3-1/4*b*d^3*n*x^2+1/2*a*d^3*x^2
 
3.1.21.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.37 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{25} \, {\left (b e^{3} n - 5 \, a e^{3}\right )} x^{5} - \frac {3}{16} \, {\left (b d e^{2} n - 4 \, a d e^{2}\right )} x^{4} - \frac {1}{3} \, {\left (b d^{2} e n - 3 \, a d^{2} e\right )} x^{3} - \frac {1}{4} \, {\left (b d^{3} n - 2 \, a d^{3}\right )} x^{2} + \frac {1}{20} \, {\left (4 \, b e^{3} x^{5} + 15 \, b d e^{2} x^{4} + 20 \, b d^{2} e x^{3} + 10 \, b d^{3} x^{2}\right )} \log \left (c\right ) + \frac {1}{20} \, {\left (4 \, b e^{3} n x^{5} + 15 \, b d e^{2} n x^{4} + 20 \, b d^{2} e n x^{3} + 10 \, b d^{3} n x^{2}\right )} \log \left (x\right ) \]

input
integrate(x*(e*x+d)^3*(a+b*log(c*x^n)),x, algorithm="fricas")
 
output
-1/25*(b*e^3*n - 5*a*e^3)*x^5 - 3/16*(b*d*e^2*n - 4*a*d*e^2)*x^4 - 1/3*(b* 
d^2*e*n - 3*a*d^2*e)*x^3 - 1/4*(b*d^3*n - 2*a*d^3)*x^2 + 1/20*(4*b*e^3*x^5 
 + 15*b*d*e^2*x^4 + 20*b*d^2*e*x^3 + 10*b*d^3*x^2)*log(c) + 1/20*(4*b*e^3* 
n*x^5 + 15*b*d*e^2*n*x^4 + 20*b*d^2*e*n*x^3 + 10*b*d^3*n*x^2)*log(x)
 
3.1.21.6 Sympy [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.37 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {a d^{3} x^{2}}{2} + a d^{2} e x^{3} + \frac {3 a d e^{2} x^{4}}{4} + \frac {a e^{3} x^{5}}{5} - \frac {b d^{3} n x^{2}}{4} + \frac {b d^{3} x^{2} \log {\left (c x^{n} \right )}}{2} - \frac {b d^{2} e n x^{3}}{3} + b d^{2} e x^{3} \log {\left (c x^{n} \right )} - \frac {3 b d e^{2} n x^{4}}{16} + \frac {3 b d e^{2} x^{4} \log {\left (c x^{n} \right )}}{4} - \frac {b e^{3} n x^{5}}{25} + \frac {b e^{3} x^{5} \log {\left (c x^{n} \right )}}{5} \]

input
integrate(x*(e*x+d)**3*(a+b*ln(c*x**n)),x)
 
output
a*d**3*x**2/2 + a*d**2*e*x**3 + 3*a*d*e**2*x**4/4 + a*e**3*x**5/5 - b*d**3 
*n*x**2/4 + b*d**3*x**2*log(c*x**n)/2 - b*d**2*e*n*x**3/3 + b*d**2*e*x**3* 
log(c*x**n) - 3*b*d*e**2*n*x**4/16 + 3*b*d*e**2*x**4*log(c*x**n)/4 - b*e** 
3*n*x**5/25 + b*e**3*x**5*log(c*x**n)/5
 
3.1.21.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.16 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{25} \, b e^{3} n x^{5} + \frac {1}{5} \, b e^{3} x^{5} \log \left (c x^{n}\right ) - \frac {3}{16} \, b d e^{2} n x^{4} + \frac {1}{5} \, a e^{3} x^{5} + \frac {3}{4} \, b d e^{2} x^{4} \log \left (c x^{n}\right ) - \frac {1}{3} \, b d^{2} e n x^{3} + \frac {3}{4} \, a d e^{2} x^{4} + b d^{2} e x^{3} \log \left (c x^{n}\right ) - \frac {1}{4} \, b d^{3} n x^{2} + a d^{2} e x^{3} + \frac {1}{2} \, b d^{3} x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a d^{3} x^{2} \]

input
integrate(x*(e*x+d)^3*(a+b*log(c*x^n)),x, algorithm="maxima")
 
output
-1/25*b*e^3*n*x^5 + 1/5*b*e^3*x^5*log(c*x^n) - 3/16*b*d*e^2*n*x^4 + 1/5*a* 
e^3*x^5 + 3/4*b*d*e^2*x^4*log(c*x^n) - 1/3*b*d^2*e*n*x^3 + 3/4*a*d*e^2*x^4 
 + b*d^2*e*x^3*log(c*x^n) - 1/4*b*d^3*n*x^2 + a*d^2*e*x^3 + 1/2*b*d^3*x^2* 
log(c*x^n) + 1/2*a*d^3*x^2
 
3.1.21.8 Giac [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.43 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{5} \, b e^{3} n x^{5} \log \left (x\right ) - \frac {1}{25} \, b e^{3} n x^{5} + \frac {1}{5} \, b e^{3} x^{5} \log \left (c\right ) + \frac {3}{4} \, b d e^{2} n x^{4} \log \left (x\right ) - \frac {3}{16} \, b d e^{2} n x^{4} + \frac {1}{5} \, a e^{3} x^{5} + \frac {3}{4} \, b d e^{2} x^{4} \log \left (c\right ) + b d^{2} e n x^{3} \log \left (x\right ) - \frac {1}{3} \, b d^{2} e n x^{3} + \frac {3}{4} \, a d e^{2} x^{4} + b d^{2} e x^{3} \log \left (c\right ) + \frac {1}{2} \, b d^{3} n x^{2} \log \left (x\right ) - \frac {1}{4} \, b d^{3} n x^{2} + a d^{2} e x^{3} + \frac {1}{2} \, b d^{3} x^{2} \log \left (c\right ) + \frac {1}{2} \, a d^{3} x^{2} \]

input
integrate(x*(e*x+d)^3*(a+b*log(c*x^n)),x, algorithm="giac")
 
output
1/5*b*e^3*n*x^5*log(x) - 1/25*b*e^3*n*x^5 + 1/5*b*e^3*x^5*log(c) + 3/4*b*d 
*e^2*n*x^4*log(x) - 3/16*b*d*e^2*n*x^4 + 1/5*a*e^3*x^5 + 3/4*b*d*e^2*x^4*l 
og(c) + b*d^2*e*n*x^3*log(x) - 1/3*b*d^2*e*n*x^3 + 3/4*a*d*e^2*x^4 + b*d^2 
*e*x^3*log(c) + 1/2*b*d^3*n*x^2*log(x) - 1/4*b*d^3*n*x^2 + a*d^2*e*x^3 + 1 
/2*b*d^3*x^2*log(c) + 1/2*a*d^3*x^2
 
3.1.21.9 Mupad [B] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.92 \[ \int x (d+e x)^3 \left (a+b \log \left (c x^n\right )\right ) \, dx=\ln \left (c\,x^n\right )\,\left (\frac {b\,d^3\,x^2}{2}+b\,d^2\,e\,x^3+\frac {3\,b\,d\,e^2\,x^4}{4}+\frac {b\,e^3\,x^5}{5}\right )+\frac {d^3\,x^2\,\left (2\,a-b\,n\right )}{4}+\frac {e^3\,x^5\,\left (5\,a-b\,n\right )}{25}+\frac {d^2\,e\,x^3\,\left (3\,a-b\,n\right )}{3}+\frac {3\,d\,e^2\,x^4\,\left (4\,a-b\,n\right )}{16} \]

input
int(x*(a + b*log(c*x^n))*(d + e*x)^3,x)
 
output
log(c*x^n)*((b*d^3*x^2)/2 + (b*e^3*x^5)/5 + b*d^2*e*x^3 + (3*b*d*e^2*x^4)/ 
4) + (d^3*x^2*(2*a - b*n))/4 + (e^3*x^5*(5*a - b*n))/25 + (d^2*e*x^3*(3*a 
- b*n))/3 + (3*d*e^2*x^4*(4*a - b*n))/16